Skip to main content

ask password

Type

command

Summary

Displays a dialog box like the ask command, but with the characters the user types displayed as asterisks (*) for privacy.

Syntax

ask password [clear] <question> [with <defaultResponse>] [titled <windowTitle>] [as sheet]

Description

Use the ask password command to provide privacy for the information the user types. For example, if the user is in a public place, the information might be seen by someone looking over his or her shoulder. This command does not encrypt the text the user types, but you can use ask password to implement a secret password with the syntax shown in the example section.

If the ask password...as sheet form is used, the dialog box appears as a sheet on OS X systems. On other systems, the as sheet form has no effect and the dialog box appears normally. Attempting to open a sheet from within another sheet displays the second stack as a modal dialog box instead.

note

Android and iOS do not support 'as sheet'.

Parameters

NameTypeDescription

question

string

The string to display as a prompt above the password entry box.

windowTitle

If specified, appears in the title bar of the dialog box. If no windowTitle is given, the title bar is blank.

defaultResponse

Placed in the text box when the dialog box appears. If no defaultResponse is specified, the text box is empty when the dialog box appears.

Examples

ask password "Please enter password"
get mcEncrypt(it)
ask password "Please log in." titled "Millenium Group Intranet"
ask password empty with savedPassword as sheet
ask password "Please log in:" with "PASSWORD" titled "Password Test"

keyword: it

property: password

command: ask

control structure: function

function: result, mcEncrypt

glossary: modal dialog box, dialog box, variable, command, return, encrypt

Compatibility and Support

Introduced

LiveCode 1.0

OS

mac

windows

linux

ios

android

Platforms

desktop

mobile

Thank you for your feedback!

Was this page helpful?